﻿using System;

namespace Calimbra.Runtime.Contracts
{
    public abstract class BaseOperation : IOperation
    {
        protected BaseOperation(string name)
        {
            this.Name = name;
            this.Implementation = Process;
        }

        protected virtual void Process(IMessage input, Action<IMessage> continueWith)
        {
            throw new NotImplementedException("Operation not implemented.");
        }

        public string Name { get; protected set; }
        public OperationAdapter Implementation { get; protected set; }
    }
}
